home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Toolbox
/
Visual Basic Toolbox (P.I.E.)(1996).ISO
/
toolkit
/
riruf1
/
rufhelp.bas
< prev
next >
Wrap
BASIC Source File
|
1995-01-18
|
1KB
|
49 lines
Option Explicit
Declare Function WinHelp Lib "User" (ByVal hWnd As Integer, ByVal lpHelpFile As String, ByVal wCommand As Integer, ByVal dwData As Any) As Integer
Global Const KEY_F1 = &H70
Const HELP_QUIT = &H2 ' Terminate help
Const HELP_CONTEXT = &H1 ' Display topic in ulTopic
Const HELP_COMMAND = &H102 ' Execute Help macro
Const HELP_INDEX = &H3 ' Display index
Const HELP_CONTENTS = &H3 ' Display Help for a particular topic
Const HELP_SEARCH = &H105 ' Display help search dialog
Dim sHelpFile$
Dim hWnd%
Sub CallHelp (ByVal lContext As Long)
Dim x%
x = WinHelp(hWnd, sHelpFile, HELP_CONTEXT, lContext)
End Sub
Sub EndHelp ()
Dim x%
Dim aLong&
aLong = 0
x = WinHelp(hWnd, sHelpFile, HELP_QUIT, aLong)
End Sub
Sub HelpContents ()
Dim x%
Dim aLong&
aLong = 0
x = WinHelp(hWnd, sHelpFile, HELP_CONTENTS, aLong)
End Sub
Sub HelpIndex ()
Dim x%
x = WinHelp(hWnd, sHelpFile, HELP_INDEX, 0)
End Sub
Sub HelpSearch ()
Dim x%
Dim aLong&
aLong = 0
x = WinHelp(hWnd, sHelpFile, HELP_SEARCH, aLong)
End Sub
Sub InitHelp (sFile As String, ByVal hMainWnd As Integer)
sHelpFile = sFile
hWnd = hMainWnd
End Sub